<?php
/**
 * 兼容第三方插件补丁文件
 * @来自第三方接口文件
 */
		defined('BY_JYA') or exit('error');
	
		list($orderid,$openid)=$arguments;
		$u='https://api.weixin.qq.com/mall/importorder?action=add-order&is_history=0/1&access_token='.$token;
		$order=pdo_get('jy_weishop_order',array('id'=>$orderid));
		
		$goods['pcatetitle']=pdo_getcolumn('jy_weishop_goods_group',array('id'=>$goods['pcate']),'title');
		$goods['ccatetitle']=pdo_getcolumn('jy_weishop_goods_group',array('id'=>$goods['ccate']),'title');
		$cate=array($goods['pcatetitle'],$goods['ccatetitle']);
		$item_list=array(
			'item_code'=>,
			'sku_id'=>,
			'amount'>,
			'total_fee'=>,
			'thumb_url'=>,
			'title'=>,
			'unit_price'=>,
			'original_price'=>,
			'category_list'=>$cate,
			'item_detail_page'=>array('src_h5_path'=>custom_url('jy_weishop/goods.detail//id='.$goodid,true)),//物品详情页面
		);
		
		$express_info=array(
			'name'=>,
			'phone'=>,
			'address'>,
			'price'=>,
		);
		$brand_info=array(
			'contact_detail_page'=>array('src_h5_path'=>custom_url('jy_weishop/index/',true)),
		);
		$info=array(
			'product_info'=>$item_list,
			'express_info'=>$express_info,
			'brand_info'=>$brand_info,
			'payment_method'=>$order['paytype'],//支付方式
			'user_open_id'=>$openid,
			'order_detail_page'=>array('src_h5_path'=>custom_url('jy_weishop/order.detail//id='.$id,true))
		);
		if($order['status']==1){
			$status=3;
		}elseif($order['status']==2){
			$status=4;
		}elseif($order['status']==-1){
			$status=5;
		}elseif($order['status']==6){
			$status=100;
		}
		$post=array(
			'order_list'=>array(
				'order_id'=>$orderid,
				'create_time'=>$order['createtime'],
				'pay_finish_time'=>$order['paytime']?$order['paytime']:0,
				'fee'=>$order['fee'],
				'trans_id'=>'',
				'status'=>$status,
				'ext_info'=>$info
			)
		);
		$re=cfc('http')->ihttp_get($u,$post);
		$re=json_decode($re['content'],true);
		if($re['errcode']==0){
			return 'success';
		}else{
			return $re['errmsg'];
		}
	
